package org.jeecg.modules.bobo.wechat.common.properties;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource("classpath:wx.properties")
@ConfigurationProperties(prefix = "wx")
public class WxConfigProperties {
//    公众号 APP_ID
    private String appId;

//    公众号 APP_SECRET
    private String appSecret;

//    公众号 TOKEN
    private String token;

//    公众号 AES_KEY
    private String aesKey;

    /**
     * 回调地址
     */
    private String notifyUrl;

    //            微信支付商户号
    private String mchId;
    //            微信支付平台商户API密钥
    private String mchKey;
    //            服务商模式下的子商户公众账号ID
    private String subAppId;
    //            服务商模式下的子商户号
    private String subMchId;
    //            apiclient_cert.p12 证书文件的绝对路径
    private String keyPath;
    //            回调地址
//    @Value(value = "${wx.paynotifyUrl}")
    private String paynotifyUrl;

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getAesKey() {
        return aesKey;
    }

    public void setAesKey(String aesKey) {
        this.aesKey = aesKey;
    }


    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getMchKey() {
        return mchKey;
    }

    public void setMchKey(String mchKey) {
        this.mchKey = mchKey;
    }

    public String getSubAppId() {
        return subAppId;
    }

    public void setSubAppId(String subAppId) {
        this.subAppId = subAppId;
    }

    public String getSubMchId() {
        return subMchId;
    }

    public void setSubMchId(String subMchId) {
        this.subMchId = subMchId;
    }

    public String getKeyPath() {
        return keyPath;
    }

    public void setKeyPath(String keyPath) {
        this.keyPath = keyPath;
    }

    public String getPaynotifyUrl() {
        return paynotifyUrl;
    }

    public void setPaynotifyUrl(String paynotifyUrl) {
        this.paynotifyUrl = paynotifyUrl;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this,
                ToStringStyle.MULTI_LINE_STYLE);
    }
}
